<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-2">
            <div class="ibox">
                <div class="ibox-title"><h5>{:lang('department name')}</h5>
                    <div class="ibox-tools"><a class="refresh-tree">{:lang('refresh')}</a></div>
                </div>
                <div class="">
                    <div id="left-tree" class="right_centent" data-url="{:url('SysDept/get_list_tree')}"> </div>
                </div>
            </div>
        </div>
        <div class="col-sm-10">
            <div class="ibox float-e-margins">
                <div class="ibox-title">{$page_title}</div>
                <div class="ibox-content table-responsive">
                    <div class="row">
                        <form id="pagerForm" method="post" class="form-inline searchForm">
                            <input type="hidden" name="pid" value="">
                            <div class="col-sm-8 m-b-xs">
                                <lqf_link>
                                    <a class="btn btn-info ajax-open" data-url="{:url('SysUser/add')}">
                                        <i class="fa fa-plus"></i>{:lang('add')}
                                    </a>
                                </lqf_link>
                                <lqf_link>
                                    <a class="btn btn-info btn-outline ajax-open-more" data-url="{:url('SysUser/userAuth')}" data-title="{:lang('set permissions')}">
                                        <i class="fa fa-asterisk"></i> {:lang('set permissions')}
                                    </a>
                                </lqf_link>
                                <lqf_link>
                                    <a class="btn btn-info btn-outline ajax-open-more" data-url="{:url('SysUser/userDept')}" data-title="{:lang('set department')}">
                                        <i class="fa fa-asterisk"></i> {:lang('set department')}
                                    </a>
                                </lqf_link>
                                <lqf_link>
                                    <a class="btn btn-info btn-outline ajax-open-more" data-url="{:url('SysUser/userPosition')}" data-title="{:lang('set position')}">
                                        <i class="fa fa-asterisk"></i> {:lang('set position')}
                                    </a>
                                </lqf_link>
                                <lqf_link>
                                    <a class="btn btn-info btn-outline ajax-open-more" data-url="{:url('SysUser/reset_pwd')}" data-title="{:lang('reset password')}">
                                        <i class="fa fa-key"></i> {:lang('reset password')}
                                    </a>
                                </lqf_link>
                                <lqf_link>
                                    <a class="btn btn-danger btn-outline ajax-get-more confirm" data-url="{:url('SysUser/del')}">
                                        <i class="fa fa-key"></i> {:lang('delete')}
                                    </a>
                                </lqf_link>
                            </div>
                            <div class="col-sm-4 m-b-xs text-right">
                                <div class="input-group ">
                                    <input type="text" name="keywords" placeholder="{:lang('enter keyword search')}" class="form-control">
                                </div>
                                <div class="input-group">
                          <span class="input-group-btn">
                          <button type="button" class="btn btn-primary ajaxSearchForm"><i class="fa fa-search"></i> {:lang('search')}</button>
                          </span></div>
                            </div>
                        </form>
                    </div>
                    <table class="table table-hover sorttable ajax-list-table" data-url="{:url('SysUser/show_json')}">
                        <thead>
                        <tr>
                            <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                            <th width="80">{:lang('accounts')}</th>
                            <th width="80">{:lang('realname')}</th>
                            <th width="60">{:lang('gender')}</th>
                            <th width="80">{:lang('mobile phone')}</th>
                            <th width="80">QQ</th>
                            <th width="80">{:lang('email')}</th>
                            <th width="80">{:lang('department name')}</th>
                            <th width="80">{:lang('position name')}</th>
                            <th width="100">{:lang('permission role')}</th>
                            <th width="120" class="text-center">{:lang('operate')}</th>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                        <tfoot class="ibox-content">
                        <tr>
                            <td colspan="11" align="center"></td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script id="tableListTpl" type="text/html">
    <% for(var i=0;i<data.length;i++) { %>
    <tr>
        <td><input name="user_id" class="checkboxCtrlId" value="<%=data[i]['id']%>" type="checkbox"></td>
        <td><%=data[i]['username']%></td>
        <td><%=data[i]['realname']%></td>
        <td><% if(data[i]['gender']==1){%>{:lang('male')}<%}else{%>{:lang('female')} <%}%></td>
        <td><%=data[i]['mobile']%></td>
        <td><%=data[i]['qicq']%></td>
        <td><%=data[i]['email']%></td>
        <td><%=data[i]['dept_name']%></td>
        <td><%=data[i]['position_name']%></td>
        <td><%=data[i]['sys_auth_name']%></td>
        <td class="text-center">
            <lqf_link><a class="ajax-open" data-url="{:url('SysUser/userRules')}"
                         data-ids="{'id':'<%=data[i]['id']%>'}" data-title="{:lang('menu authorization')}">{:lang('menu authorization')}</a></lqf_link>
            <lqf_link><a class="ajax-open" data-url="{:url('SysUser/edit')}" data-ids="{'id':'<%=data[i]['id']%>'}">{:lang('modify')}</a>
            </lqf_link>
            <lqf_link><a class="ajax-del confirm" data-url="{:url('SysUser/del')}"
                         data-ids="{'id':'<%=data[i]['id']%>'}">{:lang('delete')}</a></lqf_link>
        </td>
    </tr>
    <% } %>
</script>
<link href="__STATIC__/module/admin/js/plugins/bootstrap-treeview/bootstrap-treeview.min.css" rel="stylesheet">
<script src="__STATIC__/module/admin/js/plugins/bootstrap-treeview/bootstrap-treeview.js"></script>
<script src="__STATIC__/module/admin/js/lib/treeview.js"></script>

<script type="text/javascript">
    $(document).ready(function () {
        turnPage(1);
    });
</script>